<#include "../common/com.html"/> <@layout>

<!-- ace styles -->
<script type="text/javascript">

</script>
<#if newlist?size ==0 >
    <p class="alert alert-danger">没有此卡号消费信息</p>

</#if>
<#list hylist as m>
<div class="widget-box transparent">
    <div class="widget-header widget-header-flat">
        <h4 class="lighter">
            <i class="icon-star orange"></i> 结账信息
        </h4>     &nbsp;&nbsp;
        <!-- #list hylist as m-->
            <span class="text-error">   卡号： ${(m.card)!} </span>  ,
            <span class="text-error">   姓名： ${(m.yhm)!} </span>    ,
              <span class="text-error">  原始金额：${(m.ysje)!} </span>
            <span class="text-error">  余额：${(m.ysje)?number+(m.czje)?number-(m.vipcard)?number} 
              </span>
            <input id="carda" name="carda" type="hidden" style="min-height: 24px;" value="${(m.card)!}" />
        <!-- /#list-->
        <div class="widget-toolbar"></div>
    </div>

    <div class="widget-body">
        <div class="widget-main no-padding">
            <table class="table  table-striped table-condensed table-bordered">
                <thead>
                <tr class="info">
                    <th class="center">
                        <label>
                            <input type="checkbox" class="ace"  id="checkAll" onclick="selectAll('id')"/>
                            <span class="lbl"></span>
                        </label>
                    </th>

                    <th><i class="icon-caret-right blue">消费种类</th>
                    <th>消费数量</th>
                    <th>单价</th>
                    <th class="hidden-phone">折扣</th>
                    <th >实际金额</th>
                    <th class="hidden-phone">录入人员</th>
                    <th class="hidden-phone">日期</th>
                </tr>
                </thead>
                <#list newlist as m1>
                	<#if m.card==m1.card>
                    <tbody>
                    <tr class="info">
                        <td class="center">
                            <label>
                                <input type="checkbox" onclick="selectxf('id')" class="ace" id="id" name="id" value="${(m1.id)!}" />
                                <span class="lbl"></span>
                            </label>
                        </td>

                        <td>
                            <input id="ids" name="ids" type="hidden" style="min-height: 24px;" value="${(m1.id)!}" />

                            <input id="xfsjjgs" name="xfsjjgs" type="hidden" style="min-height: 24px;" value="${(m1.xfsjjgs)!}" />
                   ${(m1.xfmc)!}</td>

                        <td >${(m1.xfsl)!}</td>

                        <td>${(m1.xfje)!}</td>

                        <td class="hidden-phone">${(m1.xfzk)!}</td>
                        <td >${(m1.xfsjjgs)!}</td>

                        <td class="hidden-phone">${(m1.lrrymc)!}</td>
                        <td class="hidden-phone">${(m1.lrrq)!}</td>
                    </tr>
                    </tbody>
                    </#if>
                </#list>
                <tr>
                    <td colspan="2">
                        <div class="span6 pull-right">
                            <h4 class="pull-right">
                                总数量:
                            </h4>
                        </div>

                    </td>
                    <td >
                        <span class="red" id="ljsl"><#list findmoey as m2>
                        	<#if m.card==m2.card>
                        		${(m2.xfsls)!}
                        	</#if>
                        </#list> </span>
                    </td>
                    <td class="hidden-phone">

                     </td>

                    <td >
                        <h4 class="pull-right">
                            合计:
                        </h4>
                    </td>

                    <td >
                        <span class="red" id="hj"> 
                        <#list findmoey as m3>
	                        <#if m.card==m3.card>
	                        	${(m3.xfsjjgs)!}
	                        </#if>
                        </#list> </span>
                    </td>
                    <td class="hidden-phone">
                    </td>
                    <td class="hidden-phone">
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <h4 class="pull-right">
                            应收:
                        </h4>
                    </td>
                    <td >
                        <span class="red" id="ysje" >  </span>
                    </td>
                    <td  colspan="5">
                            卡消费:
                        <input type="text" name="vipcarda" id="vipcarda" class="easyui-numberbox"  precision="1" style="width: 100px;height: 24px" >
                            现金:
                        <input type="text" name="moneysa" id="moneysa" class="easyui-numberbox"  precision="1" style="width: 100px;height: 24px" >
                        <#list hylist as m4>
                        	<#if m.card==m4.card>
                            <input type="hidden" name="yea" id="yea" value="${(m4.ye)!}" >
                            </#if>
                        </#list>
                    </td>

                </tr>
                <tr>
                    <td colspan="10">
                        <button onclick="checkAdd();" class="btn btn-mini btn-danger">
                            确定结账
                        </button>
                        <button onclick="gs();" class="btn btn-mini btn-danger">
                           取消订单
                        </button>

                    </td>
                </tr>
            </table>
        </div>
        <!-- /widget-main -->
    </div>
    <!-- /widget-body -->
</div>
</#list>
<!-- /widget-box -->
 </body>


</@layout>
